package com.cy.dda.dao.mapper.collection;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.cy.dda.model.domain.collection.CollectionRecordAttachment;
import com.cy.dda.model.vo.collection.CollectionRecordAttachmentVO;

import tk.mybatis.mapper.common.BaseMapper;

/**
 * CollectionRecordAttachment
 *
 * @author: tanyilin
 * @create: 2018年11月2日 下午4:05:42
 */
@Mapper
public interface CollectionRecordAttachmentMapper extends BaseMapper<CollectionRecordAttachment> {

	/**
	 * 批量新增
	 * 
	 * @param attachmentDoAddList
	 */
	void insertBatch(@Param("attachmentDoAddList") List<CollectionRecordAttachment> attachmentDoAddList);
	
	/**
	 * 根据更新时间，删除无效数据
	 * 
	 * @param collectionRecordId
	 * @param updateTime
	 */
	void deleteByUpdateTime(@Param("collectionRecordId") Long collectionRecordId, @Param("updateTime") Date updateTime);

	/**
	 * 查询催收记录的附件信息
	 * 
	 * @return
	 */
	List<CollectionRecordAttachmentVO> selectAttachmentBycollectionRecordId(@Param("collectionRecordId") Long collectionRecordId);
}
